<template>
  <div id="newsdetail">
    <div class="tradetop">新闻公告</div>
    <div class="detail">
      <h1>{{message.title}}</h1>
      <div class="newlook">
        <div class="left"><i class="iconfont icon-yueduliang"></i>&nbsp;{{message.num}}</div>     
        <div class="right"><i class="iconfont  icon-zuijinyuedu"></i>&nbsp;{{message.add_time}}</div>
      </div>
      <div class="abstract">{{message.zhaiyao}}</div>
      <div class="message">
        <div v-html="message.content"></div>
        <!-- <img :src="image" alt=""> -->
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "newsdetail",
  data() {
    return {
      id: this.$route.query.id,
      message: {}
    };
  },
  mounted() {
    this.loadmes();
  },
  methods: {
    loadmes() {
      console.log(this.id);
      this.axios
        .post("Info/new_info", {
          id: this.id
        })
        .then(({ data }) => {
          console.log(data);
          this.message = data.info;
        })
        .catch(function(error) {
          console.log(error);
        });
    }
  }
};
</script>

<style lang="scss">
#newsdetail {
  .tradetop {
    width: 100%;
    height: 55px;
    line-height: 65px;
    font-size: 13px;
    font-family: MicrosoftYaHei-Bold;
    color: rgba(0, 0, 0, 1);
    font-weight: 700;
    padding-left: 25px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(153, 153, 153, 1);
  }
  .detail {
    width: 800px;
    height: 78px;
    // background:red;
    padding-top: 50px;
    margin: 0 auto;
    text-align: center;
    .newlook {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 14px;
      font-family: MicrosoftYaHei;
      color: rgba(136, 136, 136, 1);
      line-height: 40px;
      .left {
        margin-right: 100px;
      }
      .left .iconfont {
        font-size: 18px;
      }
    }
    .abstract {
      width: 100%;
      // height:93px;
      padding: 20px;
      box-sizing: border-box;
      font-size: 15px;
      text-align: left;
      text-indent: 2em;
      font-family: MicrosoftYaHei;
      color: rgba(102, 102, 102, 1);
      line-height: 30px;
      background: rgba(242, 242, 242, 1);
    }
    .message {
      margin-top: 30px;
      font-size: 15px;
      font-family: MicrosoftYaHei;
      color: rgba(0, 0, 0, 1);
      line-height: 27px;
      text-align: left;
      text-indent: 2em;
      img {
        display: block;
        width: 593px;
        height: 376px;
        margin: 30px auto;
      }
    }
  }
}
</style>
